package designPattern.visitorPattern.visitor;

/**
 * Book
 *
 * @author nanxin.chen
 * @date 2015/8/29
 */
public class Book implements IGoods {
    private String name;
    private int    num;
    private double    price;
    private String ISBN;

    public Book() {
    }

    public Book(String name, int num, double price, String ISBN) {
        this.name = name;
        this.num = num;
        this.price = price;
        this.ISBN = ISBN;
    }


    @Override
    public double accept(IShoppingVisitor shoppingCartVistor) {
        return shoppingCartVistor.visit(this);
    }





    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getISBN() {
        return ISBN;
    }

    public void setISBN(String ISBN) {
        this.ISBN = ISBN;
    }
}
